package net.turnbig.wechat.bot.utils;

import java.util.Date;

/**
 *
 * @author Woo Cubic
 * @date   2017-05-10 14:16:30
 */
public class DateUtils {

	/**
	 * get the seconds from 1970 to now
	 * 
	 * @return
	 */
	public static int getEpochSeconds() {
		return getEpochSeconds(new Date());
	}

	public static int getEpochSeconds(Date date) {
		return (int) (date.getTime() / 1000);
	}

	public static String getEpochSecondsStr() {
		return String.valueOf(getEpochSeconds(new Date()));
	}

}
